#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Project:     server
# @File:        u_json.py
# @Author:      Fan GuiChuan
# @Date:        2024/7/9 8:47
# @Version:     Python3.7
# @Description:
from datetime import datetime


def json_serializer(o):
    if isinstance(o, datetime):
        return o.isoformat()
    raise TypeError("Unserializable object {} of type {}".format(o, type(o)))
